package com.example.PDFdemo;

import java.io.File;
import java.io.IOException;

public class FileTest {

    public File creatFile1 () {
        return new File("C:\\Users\\admin\\Desktop\\test3.pdf");
    }

    public static void main(String[] args) throws IOException {
        FileTest fileTest = new FileTest();
        File file1 = fileTest.creatFile1();
        File file2 = new File("C:\\Users\\admin\\Desktop\\test3.pdf");
        System.out.println(file1.exists());
        file1.delete();
        System.out.println(file2.exists());
    }
}
